import 'package:flutter/material.dart';

class GirdViewBuilderCase extends StatelessWidget {
  const GirdViewBuilderCase({super.key});

  @override
  Widget build(BuildContext context) {
    return GridView.builder(
      gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
        crossAxisCount: 2, // 数量
        // mainAxisExtent: 200, // 范围 200 高度
        mainAxisSpacing: 10, // 主轴间距
        crossAxisSpacing: 10, // 交叉轴间距
        childAspectRatio: 2 / 1, // 宽高比
      ),
      itemBuilder: (context, index) {
        return Container(
          color: Colors.orange,
        );
      },
      itemCount: 12,
    );
  }
}
